<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/bootstrap/dist/css/bootstrap.min.css">
    <script src="/jquery/dist/jquery.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            height: 100%;
            background-color: rgba(255, 223, 234, 0.5);
            background-repeat: no-repeat;
            background-size: 100%;

        }
        .box {
            width: 600px;
            height: 300px;
            background-color: rgba(255, 135, 175,0.5);
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 10px 10px rgb(162, 162, 162);
            border-radius: 30px;
        }
        .box .a{
            padding-top: 30px;
            padding-left: 200px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="a">
            <form action="/dologin" class="" method="post">
                <h3 style="color: hotpink;">请输入用户名密码</h3><br>
                <input type="text" name="username" class="form-control form-text" style="width: 200px;" id="exampleInputEmail3" placeholder="请输入用户名"><br>
                <input type="password" name="password" class="form-control form-pass" style="width: 200px;" id="exampleInputPassword3" placeholder="请输入密码">
                <br>
                <button type="submit" style="margin-left: 50px;" class="btn btn-primary btn-lg btn-block">登录</button>
            </form>
        </div>
    </div>
    
</body>
<script>
    $('.btn-block').click(function(){
        let text = $('.form-text').val();
        let pass = $('.form-pass').val();
        if(text == ''){
            alert('请输入用户名');
        }else if(pass == ''){
            alert('请输入密码');
        }
    })
</script>
</html>